package com.tian;

import com.tian.factory.ApplicationContextFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 营销中心启动类
 * 注意：需要保证你配置的redis、rabbitmq、mysql、nacos正确并且启动成功，否则会报错
 */
@EnableFeignClients
@SpringBootApplication
@EnableScheduling
public class MarketServiceApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MarketServiceApplication.class, args);
        ApplicationContextFactory.setApplicationContext(context);
    }
}
